package com.qf.smartdevice.service.Impl;

import com.qf.smartdevice.mapper.MenuMapper;
import com.qf.smartdevice.pojo.Menus;
import com.qf.smartdevice.service.IMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class MenuServiceImpl implements IMenuService {

    @Autowired
    private MenuMapper menuMapper;

    @Override
    @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
    public List<Menus> findAllMenus() {

        List<Menus> list = menuMapper.findAllMenus();

        return list;
    }
}
